home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / DCLAP 4j / network / nsclilib / ncbinet.h next >
Encoding:
C/C++ Source or Header  |  1995-12-17  |  5.4 KB  |  155 lines  |  [TEXT/R*ch]

  1. /*      
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:    ncbinet.h
  27. *
  28. * Author:       Beatty, Gish
  29. *
  30. * Version Creation Date:        1/1/92
  31. *
  32. * $Revision: 1.8 $
  33. *
  34. * File Description: 
  35. *
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. * 5/12/92  Epstein     Converted tabs to spaces
  42. * 06-28-93 Schuler     Added extern "C" linkage specifier
  43. *
  44. * ==========================================================================
  45. */
  46.  
  47. #ifndef _NCBINET_
  48. #define _NCBINET_
  49.  
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53.  
  54. #include "ni_types.h"   /* include <ncbi.h> */
  55. #include "ni_defin.h"
  56. #include "ni_error.h"
  57.  
  58. #ifdef OS_MAC
  59. #include "macsockd.h"
  60. #define __TYPES__       /* avoid Mac <Types.h> */
  61. #define __MEMORY__      /* avoid Mac <Memory.h> */
  62. #define ipBadLapErr     /* avoid Mac <MacTCPCommonTypes.h> */
  63. #define APPL_SOCK_DEF
  64. #ifdef __NI_LIB__
  65. #define DONT_DEFINE_INET
  66. #else
  67. #define SOCK_DEFS_ONLY
  68. #endif
  69.  
  70. #include "sock_ext.h"
  71. extern void bzero PROTO((CharPtr target, long numbytes));
  72.  
  73. #endif /* OS_MAC */
  74.  
  75.  
  76. /* GLOBAL VARIABLES */
  77.  
  78. #if defined(OS_UNIX) || defined(OS_MAC)
  79. extern CharPtr  sys_errlist[];
  80. extern int      errno;
  81. #endif
  82.  
  83. #ifdef OS_MAC
  84. extern long     errno_long;
  85. #endif
  86.  
  87.  
  88. /* CLIENT FUNCTIONS */
  89.  
  90. extern NI_DispatcherPtr NI_SetDispatcher PROTO((NI_DispatcherPtr disp, CharPtr host, CharPtr svc, int timeout, Int4 uniqueSeqNo));
  91.  
  92. extern Int2             NI_InitServices PROTO((NI_DispatcherPtr disp, CharPtr user, CharPtr group, CharPtr password, NI_DispInfoPtr PNTR dip));
  93.  
  94. NI_DispatcherPtr NI_GenericInit PROTO((CharPtr configFile, CharPtr configSection, Boolean showMonitor, CharPtr lastDispatcher, Int2 lastDispLen));
  95.  
  96. NI_HandPtr NI_GenericGetService PROTO((NI_DispatcherPtr disp, CharPtr configFile, CharPtr configSection, CharPtr defService, Boolean hasResource));
  97.  
  98. extern Int4             NI_SetDispConfig PROTO((NI_DispInfoPtr PNTR dip, CharPtr dispatcher, Int2 dispLen));
  99.  
  100. extern Int2             NI_EndServices PROTO((NI_DispatcherPtr disp));
  101.  
  102. extern NICatalogPtr     NI_GetCatalog PROTO((NI_DispatcherPtr disp));
  103.  
  104. extern ReqPtr           NI_SVCRequestBuild PROTO((NI_DispatcherPtr disp));
  105.  
  106. extern void             NI_SVCRequestDestroy PROTO((ReqPtr reqp));
  107.  
  108. extern NI_HandPtr       NI_ServiceGet PROTO((NI_DispatcherPtr disp, CharPtr svc, Uint2 svcvermin, Uint2 svcvermax, CharPtr res, CharPtr restype, Uint2 resvermin, Uint2 resvermax));
  109.  
  110. extern NI_HandPtr       NI_ServiceRequest PROTO((ReqPtr req));
  111.  
  112. extern Int2             NI_ServiceDisconnect PROTO((NI_HandPtr mhp));
  113.  
  114. extern int              NI_ServiceGetReadFd PROTO((NI_HandPtr mhp));
  115.  
  116. extern int              NI_ServiceGetWriteFd PROTO((NI_HandPtr mhp));
  117.  
  118. extern Int2             NI_RequestSetService PROTO((ReqPtr req, CharPtr name, Uint2 vermin, Uint2 vermax));
  119.  
  120. extern Int2             NI_RequestAddResource PROTO((ReqPtr req, CharPtr name, CharPtr type, Uint2 vermin, Uint2 vermax));
  121.  
  122. extern Int2             NI_GetPlatform PROTO((void));
  123.  
  124.  
  125. /* SERVER FUNCTIONS */
  126.  
  127. extern int              NI_ServerACK PROTO((void));
  128.  
  129. extern int              NI_ServerNACK PROTO((CharPtr err_text));
  130.  
  131. extern NI_HandPtr       NI_OpenASNIO PROTO((void));
  132.  
  133. extern Int2             NI_CloseASNIO PROTO((NI_HandPtr hp));
  134.  
  135. /* TIMER MANAGEMENT */
  136.  
  137. extern void             NI_ProcessTimers PROTO((void));
  138. extern time_t           NI_GetNextWakeup PROTO((void));
  139. extern NodePtr          NI_SetTimer PROTO((time_t timeout, NI_TimeoutHook hook, Pointer hookParam));
  140. extern void             NI_CancelTimer PROTO((NodePtr timerId));
  141.  
  142. /* MISC. FUNCTIONS */
  143.  
  144. extern void             NI_SetActivityHook PROTO((NI_NetServHook hook));
  145.  
  146. /* for internal network services use only */
  147. extern NI_NetServHook   NI_ActivityHook PROTO((void));
  148. extern void             WriteConFile PROTO((Uint4 conid));
  149.  
  150. #ifdef __cplusplus
  151. }
  152. #endif
  153.  
  154. #endif
  155.